//
//  TheNewMVModel.m
//  NewMusic
//
//  Created by dllo on 15/11/20.
//  Copyright © 2015年 Going. All rights reserved.
//

#import "TheNewMVModel.h"
#import "MvListModel.h"
@implementation TheNewMVModel
-(instancetype)initWithDictionary:(NSDictionary *)dictionary {
    self = [super init];
    if (self) {
        self.tagArray = [NSArray array];
        self.mvList = [NSMutableArray array];
        [self setValuesForKeysWithDictionary:dictionary];
    }
    return self;
}
-(void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"id"]) {
        self.ID = [NSString stringWithFormat:@"%@", value];
    }
}
-(void)setValue:(id)value forKey:(NSString *)key {
    if ([key isEqualToString:@"channelId"]) {
        self.channelId = [NSString stringWithFormat:@"%@", value];
    }else if ([key isEqualToString:@"singId"]) {
        self.singId = [NSString stringWithFormat:@"%@", value];
    }else if ([key isEqualToString:@"songId"]) {
        self.songId = [NSString stringWithFormat:@"%@", value];
    }else if ([key isEqualToString:@"singerId"]) {
        self.singerId = [NSString stringWithFormat:@"%@", value];
    }else if ([key isEqualToString:@"praiseCount"]) {
        self.praiseCount = [NSString stringWithFormat:@"%@", value];
    }else if ([key isEqualToString:@"stepCount"]) {
        self.stepCount = [NSString stringWithFormat:@"%@", value];
    }else if ([key isEqualToString:@"bulletCount"]) {
        self.bulletCount = [NSString stringWithFormat:@"%@", value];
    }else if ([key isEqualToString:@"pickCount"]) {
        self.pickCount = [NSString stringWithFormat:@"%@", value];
    }else if ([key isEqualToString:@"mvList"]) {
        NSArray *array = (NSArray *)value;
        for (NSDictionary *dic in array) {
            MvListModel *model = [[MvListModel alloc]initWithDictionary:dic];
            [self.mvList addObject:model];
            [model release];
        }
    }else if ([key isEqualToString:@"tag"]) {
        self.tagArray = (NSArray *)value;
    }else {
        [super setValue:value forKey:key];
    }
}
@end
